<template>
  <div style="padding: 10px">
    <!--    搜索区-->
    <div style="margin: 10px 0">
      <el-input v-model="keyword" placeholder="请输入关键字" style="width: 20%" clearable />
      <el-button type="primary" style="margin-left: 5px" @click="searchCourseInfo">查询课程选课名单</el-button>
    </div>
    <!--    数据表-->
    <el-table :data="tableData" border style="width: 100%" stripe>
      <el-table-column prop="name" label="姓名" />
      <el-table-column prop="studentNumber" label="学号" sortable/>
      <el-table-column prop="school" label="学院" />
      <el-table-column prop="major" label="专业" />
      <el-table-column prop="phoneNumber" label="手机号码" />
      <el-table-column prop="email" label="邮箱" />
    </el-table>
  </div>
</template>

<script>
import request from "@/utils/request";

export default {
  name: "CourseRoll",
  components: {
  },
  data(){
    return{
      tableData:[],
      keyword:'',
    }
  },
  created() {
    this.load()
  },
  methods:{
    load() {
    },
    searchCourseInfo(){
      request.get("http://124.70.179.188:8082/selCourse/stuList?courseId="+this.keyword).then(res=>{
        this.tableData = res.data
      })
    },
  }
}
</script>

<style scoped>

</style>